package cc.telecomdigital.tdstock.utils;

public class Futures implements BMPEntityBase
{
	/*
	 * 恆生指數本月期貨，恆生指數下月期貨，國企指數本月期貨，國企指數下月期貨
	 */
	static final public String[]	TypeName			= { "HSI:1", "HSI:2", "HHI:1", "HHI:2" };
	static final public String		TypeName_Str		= "HSI:1,HSI:2,HHI:1,HHI:2";

	static final public String		Name				= "Name";

	static final public String		MM					= "MM";
	static final public String		Last				= "Last";
	static final public String		Net					= "Net";
	static final public String		NetPercentage		= "NetPercentage";
	static final public String		High				= "High";
	static final public String		Low					= "Low";
	static final public String		Open				= "Open";
	static final public String		Vol					= "Vol";
	static final public String		Prev				= "Prev";
	
	static final public String 		Cop					= "Cop";
	static final public String 		IsCop				= "IsCop";

	static final public String[]	FIELD_ITEMS			= { Name, MM, Last, Net, Prev, High, Low, Open, Vol };
	static final public String[]	FIELD_ITEMS_MONITOR	= { Name, MM, Last, Net, Prev, Cop };
	static final public String[]	FIELD_ITEMS_STOCK	= { Name, MM, Last, Net };
	
	static final public String[]	FIELD_ITEMS_COP	= { Name, MM, Cop/*, Last, IsCop*/ };
	
	private String					name;

	private String					mm;
	private String					last;
	private String					net;
//	private String					netPercentage;
	private String					high;
	private String					low;
	private String					open;
	private String					vol;
	private String					prev;
	
	private String 					cop;
	private String 					isCop;
	@Override
	public void SetValueByFIELDS_COP(int i, String value)
	{
		switch (i)
		{
			case 0:
				setName(value);
				break;
			case 1:
				setMm(value);
				break;
			case 2:
				setCop(value);
				break;
//			case 3:
//				setLast(value);
//				break;
//			case 4:
//				setIsCop(value);
//				break;
		}
	}
	@Override
	public void SetValueByFIELDS_STOCK(int i, String value)
	{
		switch (i)
		{
			case 0:
				setName(value);
				break;
			case 1:
				setMm(value);
				break;
			case 2:
				setLast(value);
				break;
			case 3:
				setNet(value);
				break;
		}
	}
	@Override
	public void SetValueByFIELDS_MONITOR(int i, String value)
	{
		switch (i)
		{
			case 0:
				setName(value);
				break;
			case 1:
				setMm(value);
				break;
			case 2:
				setLast(value);
				break;
			case 3:
				setNet(value);
				break;
			case 4:
				setPrev(value);
				break;
			case 5:
				setCop(value);
				break;
		}
	}
	@Override
	public void SetValueByFIELDS(int i, String value)
	{
		switch (i)
		{
			case 0:
				setName(value);
				break;
			case 1:
				setMm(value);
				break;
			case 2:
				setLast(value);
				break;
			case 3:
				setNet(value);
				break;
			case 4:
				setPrev(value);
				break;
			case 5:
				setHigh(value);
				break;
			case 6:
				setLow(value);
				break;
			case 7:
				setOpen(value);
				break;
			case 8:
				setVol(value);
				break;
		}
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getMm()
	{
		return mm;
	}

	public void setMm(String mm)
	{
		this.mm = mm;
	}

	public String getLast()
	{
		return last;
	}

	public void setLast(String last)
	{
		this.last = last;
	}

	public String getNet()
	{
		return net;
	}

	public void setNet(String net)
	{
		this.net = net;
	}

//	public String getNetPercentage()
//	{
//		return netPercentage;
//	}
//
//	public void setNetPercentage(String netPercentage)
//	{
//		this.netPercentage = netPercentage;
//	}

	public String getHigh()
	{
		return high;
	}

	public void setHigh(String high)
	{
		this.high = high;
	}

	public String getLow()
	{
		return low;
	}

	public void setLow(String low)
	{
		this.low = low;
	}

	public String getOpen()
	{
		return open;
	}

	public void setOpen(String open)
	{
		this.open = open;
	}

	public String getVol()
	{
		return vol;
	}

	public void setVol(String vol)
	{
		this.vol = vol;
	}

	public String getPrev()
	{
		return prev;
	}

	public void setPrev(String prev)
	{
		this.prev = prev;
	}

	public String getCop()
	{
		return cop;
	}

	public void setCop(String cop)
	{
		this.cop = cop;
	}

	public String getIsCop()
	{
		return isCop;
	}

	public void setIsCop(String isCop)
	{
		this.isCop = isCop;
	}

	@Override
	public void SetValueByFIELDS_NET(int index, String value)
	{
	}

	@Override
	public void SetValueByFIELDS_TURNOVER(int index, String value)
	{
	}
	@Override
	public String GetKey()
	{
		return name;
	}
	@Override
	public void SetKeyValue(String value)
	{
		name = value;
	}

}
